<template>
  <div class="page-footer">
    <a-space>
      <a-button
        v-permission="[props.permissionFlag]"
        type="primary"
        @click="saveData"
        >保存</a-button
      >
    </a-space>
  </div>
</template>

<script lang="ts" setup>
  const props = defineProps({
    permissionFlag: {
      type: String,
      required: false,
    },
  });
  const emit = defineEmits(['saveData', 'cancelData']);

  const saveData = () => {
    console.log('--');
    emit('saveData');
  };
</script>

<style lang="less" scoped>
  .page-footer {
    text-align: right;
    padding-top: 30px;
    padding-right: 20px;
    box-shadow: 0 -4px 3px -2px #ececec;
  }
</style>
